//******************************************************************************
/**
 *
 * @file	pair_poke.h
 * @brief	連れ歩きポケモン
 * @author	saito
 * @data	07.02.14
 *
 */
//******************************************************************************
#ifndef PAIR_POKE_ST_H_FILE
#define PAIR_POKE_ST_H_FILE

//==============================================================================
//	デバッグ
//==============================================================================
//----
#ifdef PM_DEBUG
#endif	//PM_DEBUG
//----


//==============================================================================
//	incldue
//==============================================================================
#include "fieldobj.h"
#include "div_map_cont_def.h"
#include "eoa.h"

#include "player_code.h"

typedef enum {
	AC_NONE,	//処理していない
	AC_START,	//処理を開始する
	AC_READY,	//処理準備
	AC_DONE		//処理が終わった
}P_POKE_AC_STOCK_CODE;

typedef struct PAIR_POKE_INFO_WORK_tag
{
	FIELD_OBJ_PTR FldObj;
	int AnimeCommand;
	int GridX;
	int GridZ;
	int MonsNo;

	u8 Sex;
	u8 NeedReset;
	u8 Follow;		//連れ歩き状態コード 0:連れ歩いてない
	u8 Rare;
	u16 Form;
	u16 Dummy;
	P_POKE_AC_STOCK_CODE Code;
}PAIR_POKE_INFO_WORK;

extern FIELD_OBJ_PTR PairPoke_Init( CONST_FIELD_OBJ_SYS_PTR fos,
		const int inX, const int inZ, const int inDir, const int inZoneID );
extern void PairPoke_Load( CONST_FIELD_OBJ_SYS_PTR fos, const int inZoneID);

extern FIELD_OBJ_PTR PairPoke_GetFldObjPtr(FIELDSYS_WORK *fsys);

extern void PairPoke_StartVanish(FIELD_OBJ_PTR fldobj, const BOOL inFlg);

extern int PairPoke_GetObjCodeFromMonsNo(const int inMonsNo, const u16 inFormNo, const int inSex);

extern void PairPoke_SetVanishFlgPrm(FIELD_OBJ_PTR fldobj, const u8 inFlg);

extern u8 PairPoke_GetVanishFlgPrm(CONST_FIELD_OBJ_PTR fldobj);

extern void PairPoke_SetJumpDirPrm(FIELD_OBJ_PTR fldobj, const u8 inDir);
extern void PairPoke_SetAppAnmPrm(FIELD_OBJ_PTR fldobj, const u8 inFlg);
extern void PairPoke_SetAnmCode(FIELD_OBJ_PTR fldobj, const u8 inCode);


extern u8 PairPoke_GetJumpDirPrm(CONST_FIELD_OBJ_PTR fldobj);
extern u8 PairPoke_GetAppAnmPrm(CONST_FIELD_OBJ_PTR fldobj);
extern u8 PairPoke_GetAnmCode(CONST_FIELD_OBJ_PTR fldobj);


extern void PairPoke_SetInfo(FIELD_OBJ_PTR fldobj, const int inMonsNo,
								const u8 inFormNo, const BOOL inRare);
extern void PairPoke_SetViewInfo(FIELD_OBJ_PTR fldobj, const int inMonsNo,
								const u8 inFormNo, const BOOL inRare, const int inObjCode);
extern void PairPoke_SetPokeInfoToWork(	FIELDSYS_WORK *fsys,
										const int inMonsNo,
										const u8 inFormNo,
										const u8 inRare,
										const u8 inSex );

extern u8 PairPoke_GetInfoFromArc_BigSize(const int inMonsNo);

extern int PairPoke_GetMonsNo(CONST_FIELD_OBJ_PTR fldobj);

extern BOOL PairPoke_IsPairPoke(FIELDSYS_WORK *fsys);
extern BOOL PairPoke_IsVisible(FIELDSYS_WORK *fsys);

extern BOOL PairPoke_CheckOldFollow(FIELDSYS_WORK *fsys);
extern BOOL PairPoke_CheckFollowable(const int inMonsNo, const int inZoneID);

extern void PairPoke_SetVanishTalkFlg(FIELD_OBJ_PTR fldobj, const BOOL inFlg);
extern void PairPoke_SetBallInState(FIELDSYS_WORK * fsys);

#endif	//PAIR_POKE_ST_H_FILE
